package main.com.hushengjin.singleton;

/**
 * 饿汉式，消耗系统内存
 */
public class SingletonObject {
    private static SingletonObject instance = new SingletonObject();

    private SingletonObject() {}

    public static SingletonObject getInstance() {
        return instance;
    }

    public void showMessage() {
        System.out.println("hello world!");
    }
}
